package errors

const (
	CodeOK           Code = 200
	CodeBadRequest   Code = 400
	CodeUnauthorized Code = 401
	CodeForbidden    Code = 403
	CodeNotFound     Code = 404
	CodeInternal     Code = 500
	CodeUnavailable  Code = 503
)

var defaultCodeMap = map[Code]string{
	CodeOK:           "ok",
	CodeBadRequest:   "bad request",
	CodeUnauthorized: "request unauthorized",
	CodeForbidden:    "forbidden",
	CodeNotFound:     "resource not found",
	CodeInternal:     "internal server error",
	CodeUnavailable:  "service unavailable",
}

func init() {
	RegisterCodeMap(defaultCodeMap)
}
